package com.bwie.parkdemo.adapter;

import android.graphics.Color;
import android.support.annotation.NonNull;
import android.widget.TextView;

import com.bwie.parkdemo.R;
import com.bwie.parkdemo.mvvm.model.entity.PointEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

public class PointAdapter extends BaseQuickAdapter<Object,BaseViewHolder> {
    public PointAdapter() {
        super(R.layout.item_point);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, Object item) {
        PointEntity.Values entity = (PointEntity.Values) item;
        helper.setText(R.id.point_item_tv,entity.pointName);
        TextView nameTv = helper.getView(R.id.point_item_tv);
        nameTv.setBackgroundResource(R.drawable.ease_chat_edit_normal);
        if (entity.isSelect){
            nameTv.setBackgroundColor(Color.parseColor("#528FFF"));
        }
    }
}
